package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysVoiceMapper;
import com.ruoyi.system.domain.SysVoice;
import com.ruoyi.system.service.ISysVoiceService;

/**
 * 数字人音色Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-03
 */
@Service
public class SysVoiceServiceImpl implements ISysVoiceService 
{
    @Autowired
    private SysVoiceMapper sysVoiceMapper;

    /**
     * 查询数字人音色
     * 
     * @param id 数字人音色主键
     * @return 数字人音色
     */
    @Override
    public SysVoice selectSysVoiceById(Long id)
    {
        return sysVoiceMapper.selectSysVoiceById(id);
    }

    /**
     * 查询数字人音色列表
     * 
     * @param sysVoice 数字人音色
     * @return 数字人音色
     */
    @Override
    public List<SysVoice> selectSysVoiceList(SysVoice sysVoice)
    {
        return sysVoiceMapper.selectSysVoiceList(sysVoice);
    }

    /**
     * 新增数字人音色
     * 
     * @param sysVoice 数字人音色
     * @return 结果
     */
    @Override
    public int insertSysVoice(SysVoice sysVoice)
    {

        sysVoice.setCreateTime(DateUtils.getNowDate());
        return sysVoiceMapper.insertSysVoice(sysVoice);
    }

    /**
     * 修改数字人音色
     * 
     * @param sysVoice 数字人音色
     * @return 结果
     */
    @Override
    public int updateSysVoice(SysVoice sysVoice)
    {
        sysVoice.setUpdateTime(DateUtils.getNowDate());
        return sysVoiceMapper.updateSysVoice(sysVoice);
    }

    /**
     * 批量删除数字人音色
     * 
     * @param ids 需要删除的数字人音色主键
     * @return 结果
     */
    @Override
    public int deleteSysVoiceByIds(Long[] ids)
    {
        return sysVoiceMapper.deleteSysVoiceByIds(ids);
    }

    /**
     * 删除数字人音色信息
     * 
     * @param id 数字人音色主键
     * @return 结果
     */
    @Override
    public int deleteSysVoiceById(Long id)
    {
        return sysVoiceMapper.deleteSysVoiceById(id);
    }
}
